package com.jiyun.controller;


import com.jiyun.pojo.Store;
import com.jiyun.service.StoreService;
import common.models.dtos.StoreDto;
import common.models.dtos.TimeDto;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;
import java.util.Map;

/**
 * 门店表
 */
@RestController
@RequestMapping("/store")
public class StoreController {

    @Autowired
    private StoreService storeService;
    @PostMapping("/findAll")
    public List<Store> findAll(@RequestBody StoreDto dto){
        List<Store> storeList = storeService.findAllAndLike(dto);
        return storeList;
    }

    @PostMapping("/findEx")
    public Map<String,Object> findex(@RequestBody TimeDto dto){
       return storeService.findTime(dto);
    }
}
